package com.qiaofang.applet.service.other.service.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @Author: youqing.yang
 * @Create: 2020/12/05 19:21
 * @Description:
 **/
@Data
@ApiModel("房源委托列表dto")
public class PropertyEntrustDto {

    @ApiModelProperty("主键")
    private Long propertyEntrustId;

    @ApiModelProperty(value = "小区")
    private String estateName;

    @ApiModelProperty("联系人姓名")
    private String contactName;

    @ApiModelProperty("联系人手机号")
    private String contactPhone;

    @ApiModelProperty(value = "价格")
    private String price;

    @ApiModelProperty(value = "期望租金")
    private String rentPrice;

    @ApiModelProperty(value = "期望售价")
    private String salePrice;

    @ApiModelProperty("栋座号")
    private String buildingName;

    @ApiModelProperty("单元")
    private String unitNo;

    @ApiModelProperty("房号")
    private String roomNo;

    @ApiModelProperty(value = "楼盘信息")
    private String buildingValue;

    @ApiModelProperty("状态 0:待联系、1:已联系")
    private String entrustStatus;

    @ApiModelProperty(value = "受理状态")
    private String statusValue;

    @ApiModelProperty(value = "类型")
    private String tradeType;

    @ApiModelProperty(value = "城市")
    private String cityName;

    @ApiModelProperty(value = "委托时间")
    private Date delegateDate;

    public String getRentPrice() {
        if ("出租".equals(tradeType)){
            return price + "元/月";
        }
        return null;
    }

    public String getSalePrice() {
        if ("出售".equals(tradeType)){
            return price + "万元";
        }
        return null;
    }
}
